package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class SimpleCase implements CaseSpecification {

    private int beginIndex;
    private int endIndex;
    private CaseOperand caseOperand;
    private List<SimpleWhenClause> simpleWhenClauseList;
    private ElseClause elseClause;

    public SimpleCase(int beginIndex,
                      int endIndex,
                      CaseOperand caseOperand,
                      List<SimpleWhenClause> simpleWhenClauseList,
                      ElseClause elseClause) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.caseOperand = caseOperand;
        this.simpleWhenClauseList = simpleWhenClauseList;
        this.elseClause = elseClause;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public CaseOperand getCaseOperand() {
        return caseOperand;
    }

    public List<SimpleWhenClause> getSimpleWhenClauseList() {
        return simpleWhenClauseList;
    }

    public ElseClause getElseClause() {
        return elseClause;
    }

}
